import request from '~/utils/request';

//获取项目列表--管理项目
export function getProjectList(data) {
    return request({
        url: '/Project/GetProjectList',
        method: 'post',
        data,
    });
}

//获取项目列表--我的项目
export function getProjectListMy(data) {
    return request({
        url: '/Project/GetProjectListMy',
        method: 'post',
        data,
    });
}

//获取项目单条信息
export function getProjectInfo(data) {
    return request({
        url: '/Project/GetProjectInfo?projectid=' + data,
        method: 'get',
    });
}

//获取项目单条信息--我的
export function getProjectInfoMy(data) {
    return request({
        url: '/Project/GetProjectInfoMy?projectid=' + data,
        method: 'get',
    });
}

//保存项目基本数据
export function saveProject(data) {
    return request({
        url: '/Project/SaveProject',
        method: 'post',
        data,
    });
}

//保存项目基本数据--开发商营销项目专用
export function saveProjectForCompany(data) {
    return request({
        url: '/Project/SaveProjectForCompany',
        method: 'post',
        data,
    });
}

//获取所有项目列表
export function getProjectBranchList() {
    return request({
        url: '/Project/GetProjectBranchList',
        method: 'get',
    });
}

//获取所有项目列表 本机构 正常的
export function getProjectSelectOfBranch() {
    return request({
        url: '/Project/GetProjectSelectOfBranch',
        method: 'get',
    });
}

//获取所属机构的项目列表
export function getProjectSelectList() {
    return request({
        url: '/Project/GetProjectSelectList',
        method: 'get',
    });
}

//设置项目状态
export function setProjectState(data) {
    return request({
        url: '/Project/SetProjectState',
        method: 'post',
        data,
    });
}

//获取项目分配方案列表
export function getProjectSchemeList(data) {
    return request({
        url: '/Project/GetProjectSchemeList',
        method: 'post',
        data,
    });
}

//获取项目分配方案详情
export function getProjectSchemeInfo(id) {
    return request({
        url: '/Project/GetProjectSchemeInfo?id=' + id,
        method: 'get',
    });
}

//设置项目分配方案收益
export function setProjectSchemeFee(data) {
    return request({
        url: '/Project/SetProjectSchemeFee',
        method: 'post',
        data,
    });
}

//生成分配表
export function createFee(data) {
    return request({
        url: '/Project/CreateFee',
        method: 'post',
        data,
    });
}

//获取分配表
export function getFee(data) {
    return request({
        url: '/Project/GetFee',
        method: 'post',
        data,
    });
}

//获取项目收益列表
export function getProjectFeeList(data) {
    return request({
        url: '/Project/GetProjectFeeList',
        method: 'post',
        data,
    });
}

//获取项目我的收益列表
export function getProjectFeeListMy(data) {
    return request({
        url: '/Project/GetProjectFeeListMy',
        method: 'post',
        data,
    });
}

export function getProjectListOfBranch(data) {
    //项目树形--指定机构
    return request({
        url: '/Project/GetProjectListOfBranch',
        method: 'get',
        data,
    });
}

export function setManageFee(data) {
    //项目管理费结算
    return request({
        url: '/Project/setManageFee',
        method: 'post',
        data,
    });
}

export function getProjectFileList(id) {
    //获取项目附件列表
    return request({
        url: '/Project/getProjectFileList?projectid=' + id,
        method: 'get',
    });
}

export function saveProjectFileInfo(data) {
    //保存项目附件
    return request({
        url: '/Project/SaveProjectFileInfo',
        method: 'post',
        data,
    });
}

export function setProjectFileState(data) {
    //设置项目附件列表状态
    return request({
        url: '/Project/SetProjectFileState',
        method: 'post',
        data,
    });
}

export function getProjectDataInfo(id) {
    //获取项目详情
    return request({
        url: '/Project/GetProjectDataInfo?projectDataID=' + id,
        method: 'get',
    });
}

export function getBuilingLogoSelectList(id) {
    //获取小区图片
    return request({
        url: '/Project/GetBuilingLogoSelectList?buildingID=' + id,
        method: 'get',
    });
}

export function getBuilingShowPicList(id) {
    //获取小区图片
    return request({
        url: '/Project/GetBuilingShowPicList?buildingID=' + id,
        method: 'get',
    });
}
//获取活动列表
export function getProjectDataByCompany(data) {
    return request({
        url: '/Project/GetProjectDataByCompany',
        method: 'post',
        data,
    });
}
//根据公告id查询公告详情
export function getProjectNoticeInfo(id) {
    return request({
        url: '/Project/GetProjectNoticeInfo?id=' + id,
        method: 'get',
    });
}
//获取公告
export function getProjectNoticeListApi(data) {
    return request({
        url: '/Project/GetProjectNoticeListApi',
        method: 'post',
        data,
    });
}
